import request from '@/config/axios'

export interface ReplyConfigVO {
        id: number
        keys: string
        content: string
}

// 查询自动回复配置列表
export const getReplyConfigPage = async (params) => {
    return await request.get({url: `/service/reply-config/page`, params})
}

// 查询自动回复配置详情
export const getReplyConfig = async (id: number) => {
    return await request.get({url: `/service/reply-config/get?id=` + id})
}

// 新增自动回复配置
export const createReplyConfig = async (data: ReplyConfigVO) => {
    return await request.post({url: `/service/reply-config/create`, data})
}

// 修改自动回复配置
export const updateReplyConfig = async (data: ReplyConfigVO) => {
    return await request.put({url: `/service/reply-config/update`, data})
}

// 删除自动回复配置
export const deleteReplyConfig = async (id: number) => {
    return await request.delete({url: `/service/reply-config/delete?id=` + id})
}

// 导出自动回复配置 Excel
export const exportReplyConfig = async (params) => {
    return await request.download({url: `/service/reply-config/export-excel`, params})
}